import { iconTypes } from '@mintlify/models';
import { z } from 'zod';
import { anchorColorSchema } from './anchorColors.js';
export const anchorSchema = z.object({
    name: z.string().trim().nonempty(),
    url: z.string().trim().nonempty(),
    icon: z
        .string({
        invalid_type_error: 'Anchor icon must be the name of a Font Awesome icon. Visit this link to see all the available icons: https://fontawesome.com/icons',
    })
        .refine((icon) => !icon.startsWith('fa-'), "Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name")
        .optional(),
    iconType: z.enum(iconTypes).optional(),
    color: anchorColorSchema.optional(),
    isDefaultHidden: z.boolean().optional(),
    version: z
        .string({
        invalid_type_error: 'Version must be a string in the #.versions array',
    })
        .optional(),
});
export const topAnchorSchema = z
    .object({
    name: z.string(),
    icon: z.string().optional(),
    iconType: z.enum(iconTypes).optional(),
})
    .strict();
